import request from '@/utils/request'

// 查询商品明细
export function getGoodsInfo() {
  return request({
    url: '/data/appCommodity/goodsInfo',
    method: 'get'
  })
}

// 查询商品明细
export function getParameterInfo() {
  return request({
    url: '/app/parameter/list',
    method: 'get'
  })
}

//查询商品订单
export function selectGoodsInfo(query) {
	return request({
		url: '/data/appCommodity/getGoodsInfo',
		method: 'get',
		params: query
	})
}

//查询商品订单明细
export function goodInfoDetail(query) {
	return request({
		url: '/data/appCommodity/getGoodsInfoDetail',
		method: 'get',
		params: query
	})
}

//查询卡号
export function selectCardNumberInfo(query) {
	return request({
		url: '/data/appCommodity/baseSaleCustomer',
		method: 'get',
		params: query
	})
}

//查询户头
export function selectAccountInfo(query){
  return request({
    url:'/data/appCommodity/baseSaleCustomerAccount',
    method:'get',
	params: query
  })
}

//添加商品信息
export function addGoodsInfo(data) {
  return request({
    url: '/data/appCommodity/addGoodsInfo',
    method: 'post',
    data: data
  })
}

//修改商品信息
export function editGoodsInfo(data) {
  return request({
    url: '/data/appCommodity/editGoodsInfo',
    method: 'post',
    data: data
  })
}

//修改合同信息
export function editContract(data) {
  return request({
    url: '/data/appCommodity/editContract',
    method: 'post',
    data: data
  })
}

// 删除计划详情
export function delPlanItem(data) {
  return request({
    url: '/data/appCommodity/delPlanItem',
    method: 'post',
    data: data
  })
}

// 撤销销售计划
export function cancelPlan(data) {
  return request({
    url: '/data/appCommodity/planCancel',
    method: 'put',
    data: data
  })
}

// 搜索商品
export function searchGoods(data) {
  return request({
    url: '/data/appCommodity/searchGoodsInfo',
    method: 'get',
    params: data
  })
}

//查询追溯流程
export function getMindMap(billNumber){
  return request({
    url:'/data/appCommodity/getMindMap/'+billNumber,
    method:'get'
  })
}

//查询轮播图图片
export function getImgInfo(query){
  return request({
    url:'/system/img/list/',
    method:'get',
	params: query
  })
}

// 获取状态值
export function getStatusValue(data) {
  return request({
    url: '/data/appCommodity/getCarMindMap',
    method: 'post',
    data: data
  })
}

// 查询商品明细
export function getGoodsCategoryInfo() {
  return request({
    url: '/data/appCommodity/goodCategoryList',
    method: 'get'
  })
}

// 跟据ID 查询商品最新价格信息
export function getGoodInfoNew(commodityId) {
 return request({
   url: '/data/appCommodity/getGoodInfoNew/' + commodityId,
   method: 'get'
 })
}
// 获取磅房计重信息
export function getPoundScaleWeighing(data) {
  return request({
    url: '/data/appCommodity/getPoundScaleWeighing',
    method: 'post',
    data: data
  })
}

//获取打印信息
export function getPlanPriceItem(id) {
  return request({
    url:'/data/appCommodity/item/'+id,
    method:'get',
  })
}
//获取化验室数据
export function getEthanolYJInfo() {
  return request({
    url: '/data/appCommodity/YJ/Info',
    method: 'get'
  })
}
//按照创建日期获取化验室数据
export function getEthanolYJInfoByDate(date){
  return request({
    url:'/data/appCommodity/YJ/Info/'+date,
    method:'get'
  })
}
//获取无水酒精化验室数据
export function getEthanolWSInfo() {
  return request({
    url: '/data/appCommodity/WS/Info',
    method: 'get'
  })
}

//按照创建日期获取化验室数据
export function getEthanolWSInfoByDate(date){
  return request({
    url:'/data/appCommodity/WS/Info/'+date,
    method:'get'
  })
}